<script>
export default {
  onLaunch: function () {
    console.log("App Launch");
    uni.onTabBarMidButtonTap(function (e) {
      uni.$emit("page", {
        show: true
      });
    });
  },
  onShow: function () {	
    let token=localStorage.getItem('token')
	if(token){
		uni.reLaunch({
			url: 'pages/home/home'
		});
	}else{
		uni.reLaunch({
			url: 'pages/login/login'
		});
	}
  },
  onHide: function () {
    console.log("App Hide");
  },
};
</script>

<style lang="scss">
@import "uview-ui/index.scss";
/*每个页面公共css */
</style>
